<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:php="http://php.net/xsl" version="1.0">
	<xsl:output method="html" indent="no"/>

	<xsl:template match="//platcode">
		<html>
			<head>
				<title>XSS Filter</title>
			</head>
			<body>
				<xsl:apply-templates select="answer"/>
				<p>
					<form action="/xss" method="POST">
						<textarea name="t" style="width:100%;height:300px">
							<xsl:value-of select="post"/>
						</textarea>
						<input type="submit" value="Send"/>
					</form>
				</p>
			</body>
		</html>
	</xsl:template>

	<xsl:template match="answer">
		<p>
			<xsl:text>Output:</xsl:text>
			<pre>
				<code>
					<xsl:value-of select="." disable-output-escaping="yes"/>
				</code>
			</pre>
		</p>
	</xsl:template>

</xsl:stylesheet>
